@import "@automattic/typography/styles/variables";
@import "@wordpress/base-styles/variables";
@import "variables";

@mixin help-center-link {
    > ul {
        list-style: none;
        padding: 0;
        text-align: left;
        border: 1px solid var(--studio-gray-5);
        border-radius: 8px;
        margin: 0;
        overflow: hidden;
    }

    .help-center-link__item {
        
        border-bottom: 1px solid var(--studio-gray-5);
        display: block;
        line-height: 1.3;
        margin-bottom: 0;

        &:first-child {
            a:focus, button:focus {
                border-radius: 8px 8px 0 0;
            }
        }

        &:last-child {
            border-bottom: 0;

            a:focus, button:focus {
                border-radius: 0 0 8px 8px;
            }
        }

        .help-center-link__cell {
            display: block;
            width: 100%;

            &:hover {
                a, button {
                    background: color-mix(in srgb, #fff 98%, var(--wp-admin-theme-color, $help-center-blue));
                    color: var(--wp-components-color-accent, var(--wp-admin-theme-color, $help-center-blue));
                    cursor: pointer;
                }

                svg {
                    fill: var(--wp-components-color-accent, var(--wp-admin-theme-color, $help-center-blue));
                }
            }

            a,
button {
                all: unset;
                padding: 16px;
                display: flex;
                text-decoration: none;
                color: var(--studio-gray-100);
                font-size: $font-body-small;
                border-radius: 2px;
                font-weight: normal;
                align-items: center;
                transition: background-color 0.3s ease;
                line-height: 1.4;
                width: 100%;
                min-width: 0;
                box-sizing: border-box;
                gap: 8px;

                svg {
                    flex-shrink: 0;
                    fill: $gray-700;
                    display: block;
                }

                span {
                    flex: 1;
                    min-width: 0;
                    text-align: left;
                }

                &:focus {
                    color: var(--studio-gray-100);
                    outline: $help-center-blue solid 2px;
                    outline-offset: -2px;
                }
            }
        }
    }
}

